﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShippingProductDetail.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.Shop.ShippingProduct.ShippingProductDetail" %>

<%@ Register src="~/SystemManage/Control/JGridControl.ascx" tagname="JGridControl" tagprefix="uc1" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>
<%@ Import Namespace ="ZLCMS.Data.Model" %>
<%@ Import Namespace ="ZLCMS.Business.Shop" %>

<form id="pageForm" method="post" runat="Server" class="pageForm required-validate"
    onsubmit="return validateCallback(this, navTabAjaxDone);" action="/SystemManage/Basics/Shop/ShippingProduct/ShippingProductDetail.aspx">

<div class="pageContent">
    <div class="pageFormContent" layoutH="56">
    	
        
    <div class="panel collapse">
		<h1 class="contentTitle">基本信息</h1>  
        <div>
        <dl class="nowrap">
            <dt>订单号：</dt>
            <dd><asp:TextBox ID="orderNo" runat="server" class="required" width="200px"></asp:TextBox></dd>
        </dl>
        
        <dl class="nowrap">
            <dt>快递公司：</dt>
            <dd>
                <asp:dropdownlist runat="server" id="shippinglist"></asp:dropdownlist>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>快递单号：</dt>
            <dd>
                <asp:textbox id="shippingno" width="200px" runat="server" class="required"></asp:textbox>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>费用：</dt>
            <dd>
                <asp:textbox id="price" width="200px" runat="server" class="required"></asp:textbox>
            </dd>
        </dl>

        
    <div class="formBar">
    <ul>
    <li>
        <div class="buttonActive"><div class="buttonContent"><button onclick="$('#submit_op', navTab.getCurrentPanel()).val('0');" type="submit">保存</button></div></div>
      </li>  
    </ul>
      </div>   
      </div> 
	</div>
        
        <%if (OrderShipping.Id > 0)
          { %>
    <div class="panel collapse">
		<h1>发货单信息[<%= ParamKit.GetValue("OrderIsFinish", OrderShipping.FinishStatus, "&nbsp;")%>]</h1>
		<div>
        <uc1:JGridControl ID="JGridControl2" runat="server" DialogHeight="380" DialogWidth="750"
                         KeyColumnName="Id" onremove="removeRecord" />

                         
		</div>
	</div>
    <%} %>
    </div>
      
        <%if (OrderShipping.Id > 0)
          { %>
    <div class="formBar">
    <ul>

                    <li>
                         <a style="margin-right: 5px;" class="button" href='http://www.kuaidi100.com/chaxun?com=<%=OrderShipping.ShippingType %>&nu=<%=OrderShipping.ShippingNo %>' target='_blank'><span>查物流</span></a>
                    </li>
                    <li>
                    <%-- 确认完成--%>
                         <%if (OrderShipping.FinishStatus == "1")
                           {%>
                         <%}
                           else
                           { %>
                         <a style="margin-right: 5px;" class="button" href="#" onclick="confirmReceive()"><span>确认签收</span></a>
                         <%} %>  </li>  
    </ul>
		</div>
    <%} %>
          
</div>
</form>
<%if (OrderShipping.Id > 0)
  { %>
<script type="text/javascript">
    removeRecord = function (ids) {
        $.get("/SystemManage/Basics/Shop/ShippingProduct/ShippingProductDetail.aspx?uid=<%=OrderShipping.Id %>", { ajax: '1', ids: $.toJSON(ids) },
          function (data) {
            navTab.reloadFlag('ShippingProductDetail');
          });
    }
    confirmReceive = function () {
        if (confirm('请确认把状态改成已签收')) {
            $.get("/SystemManage/Basics/Shop/ShippingProduct/ShippingProductDetail.aspx?uid=<%=OrderShipping.Id %>&finish=1", { ajax: '1' },
          function (data) {
              navTab.reloadFlag('ShippingProductDetail');
          });
        }
    }
</script>
<%} %>